var SearchForm = function () {
  var template = /* html */ `
    <div class="search-form">
      <el-form inline label-width="auto">
        <el-form-item label="警报类型">
          <sys-autocomplete v-model="search.typeName" class="search-input" :options="warnTypeList" placeholder="请输入警报类型">
          </sys-autocomplete>
        </el-form-item>
        <el-form-item label="警报代码">
          <el-input v-model="search.alarmCode" class="search-input" placeholder="请输入警报代码"></el-input>
        </el-form-item>
        <el-form-item label="警报描述">
          <el-input v-model="search.codeDescribe" class="search-input" placeholder="请输入警报描述"></el-input>
        </el-form-item>
        <el-form-item label="看板是否显示">
          <el-select clearable v-model="search.isShow" class="search-input">
            <el-option v-for="item in isShowList" :key="item.value" :value="item.value" :label="item.label">
            </el-option>
          </el-select>
        </el-form-item>
      </el-form>
    </div>
  `;

  return {
    props: {
      search: {
        type: Object,
        required: true
      },

      warnTypeList: {
        type: Array,
        required: true
      }
    },

    data: function () {
      return {
        isShowList: i18n.getDropDown('machineRepair.warnSetting.isShow', [1, 2])
      };
    },

    components: {
      SysAutocomplete: SysAutocomplete
    },

    template: template
  };
}();
